package com.zpf.service.impl;

import com.zpf.dao.GoodsDao;
import com.zpf.dao.impl.GoodsDaoImpl;
import com.zpf.pojo.Goods;
import com.zpf.service.GoodsService;

import java.util.List;

public class GoodsServiceImpl implements GoodsService {
    GoodsDao goodsDao = new GoodsDaoImpl();
    @Override
    public void addGoods(Goods goods) {
        goodsDao.addGoods(goods);

    }

    @Override
    public List<Goods> findGoodsAll() {
        List<Goods> list = goodsDao.findGoodsAll();
        return list;
    }

    @Override
    public Goods findGoodsById(Integer id) {
          Goods goods = goodsDao.findGoodsById(id);
        return goods;
    }
}
